package cn.ajb.filemanager.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.ajb.filemanager.entity.FileManager;



@MapperScan
public interface FileManagerDao {
	
	//通过parentId获取底下所有子集
	public List<FileManager> selectFileManagerListByParentId(Integer parentId);
	//获取整个树形结构
	public List<FileManager> selectFileManagerTree(Integer parentId);
	//只获取类型为文件夹的树形结构
	public List<FileManager> selectFileManagerFolderTree(Integer parentId);
	
	public FileManager selectFileManagerById(Integer id);
	
	public Integer insertFileManager(FileManager fileManager);
	
	public FileManager selectFileManagerByCondition(FileManager fileManager);
	
	public void deleteByList(List<Integer> list);
	
	public void updateFileManagerFolderById(FileManager fileManager);
	
	public FileManager selectFileManagerDetailById(Integer id);
	
	public void updateFileManagerFile(FileManager fileManager);
	
	public void updataFileDowloandCount(FileManager fileManager);
	
	public List<FileManager> selectFileManagerListByParentIdAndPage(Map<String, Object> paramMap);
	
	public int selectFileManagerListCountByParentId(Map<String, Object> paramMap);
	
	public List<FileManager> searchFilManagerFile(Map<String, Object> paramMap);
	
	public int searchFilManagerFileCount(Map<String, Object> paramMap);
	
}
